package com.itheima.mapper;

import com.itheima.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@Mapper
public interface MemberMapper {
    /**
     * 添加会员
     * @param member
     */
    void insertMember(Member member);

    /**
     * 根据日期范围查询会员数量
     * @param max
     * @param min
     * @return
     */
    @Select("select count(*) from t_member where regTime between #{min} and #{max}")
    Integer getMemberCountByDate(Date max,Date min);

    /**
     * 根据日期范围查询会员数量
     * @param beginTime
     * @return
     */
    Integer findMemberCountByDate(Date beginTime);
}
